from bs4 import BeautifulSoup
path = 'new_index.html'
data = []
with open(path,'r') as f:
    soup = BeautifulSoup(f,'lxml')
    images = soup.select('ul > li > img')
    titles = soup.select('ul > li > div.article-info > h3 > a')
    cate = soup.select('ul > li > div.article-info > p.meta-info')
    desc = soup.select('ul > li > div.article-info > p.description ')
    rate = soup.select('ul > li > div.rate > span')
    # print(images,titles,cate,desc,rate,sep='\n')

for titles,cate,desc,rate,images in zip(titles,cate,desc,rate,images):
    info = {
        'titles': titles.get_text(),
        'cate' : list(cate.stripped_strings),
        'desc' : desc.get_text(),
        'rate' : rate.get_text(),
        'images' : images.get('src')
    }
    data.append(info)

for i in data:
    if float(i['rate']) > 4:
        print(i['titles'])
